feat(fly-io,hetzner,railway): MachineIdentity, tagged createServer errors, slim GraphQL - #477
Merged
Merged
Conversation
FlyIoProtocol still sends Bearer by default. When MachineIdentity is provided on the calling fiber, encode drops Authorization and sets Connection: close so encrypt/sign/decrypt/verify work as the machine over the unix socket without sniffing an empty token.
Contributor
|
Install the packages built from this commit: Distilled@distilled.cloud/core bun add https://pkg.ing/@distilled.cloud/core/88b462a@distilled.cloud/aws bun add https://pkg.ing/@distilled.cloud/aws/88b462a@distilled.cloud/axiom bun add https://pkg.ing/@distilled.cloud/axiom/88b462a@distilled.cloud/azure bun add https://pkg.ing/@distilled.cloud/azure/88b462a@distilled.cloud/cloudflare bun add https://pkg.ing/@distilled.cloud/cloudflare/88b462a@distilled.cloud/coinbase bun add https://pkg.ing/@distilled.cloud/coinbase/88b462a@distilled.cloud/discord bun add https://pkg.ing/@distilled.cloud/discord/88b462a@distilled.cloud/expo-eas bun add https://pkg.ing/@distilled.cloud/expo-eas/88b462a@distilled.cloud/fly-io bun add https://pkg.ing/@distilled.cloud/fly-io/88b462a@distilled.cloud/gcp bun add https://pkg.ing/@distilled.cloud/gcp/88b462a@distilled.cloud/github bun add https://pkg.ing/@distilled.cloud/github/88b462a@distilled.cloud/hetzner bun add https://pkg.ing/@distilled.cloud/hetzner/88b462a@distilled.cloud/kubernetes bun add https://pkg.ing/@distilled.cloud/kubernetes/88b462a@distilled.cloud/mongodb-atlas bun add https://pkg.ing/@distilled.cloud/mongodb-atlas/88b462a@distilled.cloud/neon bun add https://pkg.ing/@distilled.cloud/neon/88b462a@distilled.cloud/planetscale bun add https://pkg.ing/@distilled.cloud/planetscale/88b462a@distilled.cloud/posthog bun add https://pkg.ing/@distilled.cloud/posthog/88b462a@distilled.cloud/prisma-postgres bun add https://pkg.ing/@distilled.cloud/prisma-postgres/88b462a@distilled.cloud/railway bun add https://pkg.ing/@distilled.cloud/railway/88b462a@distilled.cloud/stripe bun add https://pkg.ing/@distilled.cloud/stripe/88b462a@distilled.cloud/supabase bun add https://pkg.ing/@distilled.cloud/supabase/88b462a@distilled.cloud/turso bun add https://pkg.ing/@distilled.cloud/turso/88b462a@distilled.cloud/typesense bun add https://pkg.ing/@distilled.cloud/typesense/88b462a@distilled.cloud/vercel bun add https://pkg.ing/@distilled.cloud/vercel/88b462a@distilled.cloud/workos bun add https://pkg.ing/@distilled.cloud/workos/88b462a |
The GraphQL `projects` connection was selecting nested workspace/team/members/baseEnvironment at maxDepth 2. That pulled subscriptionType and canvasGroupRefs, failed decode on live rows, and made listOwnedProjects hang under nuke. Also terminate paginateRelay when endCursor does not advance.
Nuke scans ~20 resource list()s that each call project({id}) and
environments. The default maxDepth-2 selection pulled workspace/team/
members/baseEnvironment and canvasGroupRefs, then distilled retried
429s silently for minutes.
project({id}) now selects identity plus services/buckets/groups.
environments list is identity scalars. HttpClient GraphQlHttpGate
caps in-flight GraphQL POSTs at 2 (DISTILLED_RAILWAY_GRAPHQL_CONCURRENCY).
Do not serialize GraphQL behind a process lock. Slim project({id}) and
environments selections are the nuke-scan fix; wrapping HttpClient broke
.items() streams.
Volume.list can enumerate from the slim environments connection.
Nuke must not call environment({id}) — that GET still selects
canvasGroupRefs/meta and is what made the scan spin.
Select volumeInstances on volumeCreate and environments list, drop the nested environment from volumeInstance GET, stamp service.templateId on the slim project query, and map ServiceInstance/BucketInstance-not-found plus "creating too quickly" onto RailwayNotFound/RailwayRateLimited. GraphQL rate limits without Retry-After default to 31s.
S3 (and Tigris) report a missing object as NoSuchKey. deleteObject was patched to NotFound, so Fly.Website.AssetDeployment could not catchTag the same error AWS S3 getObject uses.
…nCreateFailed GraphQL INTERNAL_SERVER_ERROR "Failed to create service domain" is a transient instance-not-ready. Also map environment-create rate limits.
…loyment mutations Hetzner createServer now surfaces ServerLimitExceeded and ServerPlacementError instead of Forbidden/PreconditionFailed message checks. convert.ts applies /shapes/ patches after OpenAPI conversion. Railway deploymentCancel/Remove/Stop/Restart queries match Boolean! (no subfields). GraphQL requests send source=alchemy so the public edge does not apply the anonymous 10 RPS cap, and retry-after also parses "every N s".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Fly
MachineIdentityso Machines PetSem encrypt/sign/decrypt/verify can talk to/.fly/apias the machine. Org-token GetSecret on the same fiber is unchanged.Slim Railway GraphQL list/get selections so nuke
list()s don't pullworkspace/team/members/baseEnvironment/canvasGroupRefs/subscriptionType— those fields fail decode on live rows and blow the rate budget. StoppaginateRelaywhenendCursordoes not advance. Type GraphQLINTERNAL_SERVER_ERROR"not found" / "creating too quickly" asRailwayNotFound/RailwayRateLimited, and parse retry-after from"per N seconds"or"every N s"(default 31s when the gateway sends none). Identify GraphQL assource=alchemyso Cloudflare's anonymous 10 RPS cap does not apply.Type Hetzner
createServerquota/placement failures asServerLimitExceeded/ServerPlacementErrorinstead ofForbidden/PreconditionFailedplus message text.convert.tsapplies/shapes/patches after OpenAPI conversion.Fly MachineIdentity
FlyIoProtocolstill sendsAuthorization: Bearerby default. A per-callMachineIdentityservice drops that header and setsConnection: close. The protocol does not sniff an empty API key.Generated machines ops are unchanged. Callers provide
MachineIdentityplus anHttpClientwithsocketPath: "/.fly/api".Hetzner createServer errors
Railway GraphQL
environment({id})still selectscanvasGroupRefs/meta. List paths must not call it.